package admin

import (
	database "hft/Database"
)

type LouPanName struct {
	database.Base
	Name       string `json:"name" gorm:"uniqueIndex:name_region"`
	RegionLink string `json:"regionLink" gorm:"index"`
	RegionId   int    `json:"regionId" gorm:"uniqueIndex:name_region"`
	BelongName string `json:"belongName"`
	HasUse     int    `json:"hasUse" gorm:"type:tinyint(1);size:1"`
	FirstWord  string `json:"firstWord" gorm:"index"`
	// Lou        *LouPan `json:"lou" gorm:"foreignKey:Name;references:Name;constraint:OnDelete:SET NULL,OnUpdate:CASCADE"`
}

func (LouPanName) TableName() string {
	return database.TableNameFormat("loupan_name")
}
